import Vue from 'vue'
import Router from 'vue-router'
import Index from '../pages/Index'
import Home from '../pages/Home'
import Rule from '../pages/Rule'
import CRule from '../pages/CRule'
import Mode from '../pages/Mode'
import Team from '../pages/Team'
import Training from '../pages/Training'
import Competition from '../pages/Competition'
import Lost from '../pages/Lost'
import LevelUp from '../pages/LevelUp'
import Win from '../pages/Win'
import Lottery from '../pages/Lottery'
import Prize from '../pages/Prize'
import Test from '../pages/Test'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/oauth2/:openId/:nowTime',
      name: 'Index',
      component: Index
    },
    {
      path: '/test',
      name: 'Test',
      component: Test
    },
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/rule',
      name: 'Rule',
      component: Rule
    },
    {
      path: '/mode',
      name: 'Mode',
      component: Mode
    },
    {
      path: '/team',
      name: 'Team',
      component: Team
    },
    {
      path: '/training/:item_id',
      name: 'Training',
      component: Training
    },
    {
      path: '/crule',
      name: 'CRule',
      component: CRule
    },
    {
      path: '/competition/:lv',
      name: 'Competition',
      component: Competition
    },
    {
      path: '/lost',
      name: 'Lost',
      component: Lost
    },
    {
      path: '/levelup',
      name: 'LevelUp',
      component: LevelUp
    },
    {
      path: '/win',
      name: 'Win',
      component: Win
    },
    {
      path: '/lottery/:prizeId',
      name: 'Lottery',
      component: Lottery
    },
    {
      path: '/prize/:prizeId/:recordId',
      name: 'Prize',
      component: Prize
    }
  ]
})

export default router
